File#realpath is undefined in 1.8.7