Replacing regexp file test with File.file?.