Added the first test

Note that in ls, it must be renamed.
Minor clean up
added dependency on chai for testing
First bug found. And fixed!