Modified rewrite utils to work with a file or directory.  Added test for just rewriting a file.