Apparently os.path.samefile() stats the files and throws exceptions. :(