check that we can't change a file to a directory