Use Pathname to get realpath for 1.8 compatibility