Added a nice test suite for the cryptor and fixed a few bugs that it discovered