check for directory? in WeirdMethodLocator#valid_file?

addresses http://jira.codehaus.org/browse/JRUBY-7114