finished test case for registerAccount() and interactiveLogin()

- file open always overwrites an existing file
- fixed file writes/reads and decrypts and encrypts to correctly return
the buffer sizes
- fixed code in registerAccount() to pass in actual PGP len rather than
the full buffer size - this was resulting in test failure as reading
that size back and decrypting would know the correct size but the
initial write was using the full buffer size
- test_registerAccount now passes