Added a test

Tests the main methods. Still some
unresolved issues with spaces added
in the unlock method as well as the
history cleanup. Will investigate
later.