Better support for files, not only directories.