Handle optional master password

This change allows command line switch -P to be specified, prompting
entry of a master password.
Merge pull request #1 from quinot/master

Handle optional master password