Cleaning up the path issues. Sadly, can't do that in a cleaner way due to mess in Pathname library.