Do a better job at inferring whether a file is of a certain type when there's no path available