mavenized build

* created POM
* removed lib dir
* moved code into standard maven dirs
fixed typo
streams were never closed, creating a leak
improved tests by testing all members and writing tests for things that
shouldn't be done
Merge pull request #1 from The-Alchemist/mavenize

Mavenize build, improve tests, and fix stream leaks.