allow a directory, not just a file, to be specified