adding ability to take files in addition to directories
adding more stuff that supports the two-file invocation calling style
still broken