Code cleanup and fix images->[html|pdf]

I cleaned up the code a little bit, also fixed the images->html and pdf functions.  I spent way too much time looking over this code it is embarrassing.  I am still working on getting some good dev tools/env for Clojure so it took longer than normal for me to figure this one out.  But you could run in to some issues with name collision and the tests.  Since we were calling the output files for our test files "test" Clojure may return true when the .exists call is made cause technically that directory does exist.  We don't want this.  So I moved where the file was located and adjusted the functions so they don't just insert the extension.  All tests are completing successfully again.