clean up a bit
use sinon for tests
tests and fixes
api change: pass files object instead of specifics
bump (v0.4.0)