Cross-Platform which method do not return a directory as valid result

`File.executable?` can return true if is a directory, just verify if is a file before test is is executable.

Problem spotted on OSX (Montain Lion) with ruby 2.0.0-p247