Various issue fixes

Fixes outstanding issues https://github.com/SpiderOak/crypton/issues/142 https://github.com/SpiderOak/crypton/issues/161 and https://github.com/SpiderOak/crypton/issues/141