Part of #1452 effort.
Added stat method to FileResource and refactored RubyFileStat to make…
… use of it.
This way RubyFileStat doesn't need to do any more custom logic for jars.
Harden against null path names.
I merged this several days ago to both 1.7 and master.