Add specs for File.realpath with invalid inputs
Fix File.realpath with invalid inputs. Fixes #2165
Merge pull request #2210 from kachick/fix-file-realpath_should_raise_error_if_invalid_path

Fix File.realpath (for #2165)