Remove unused code.
Update unittests.
Fix quoting.
Add a test with % in filename.