Handle \0 restriction cleanly

py-bcrypt does not allow \0 to appear in passwords. In order to achieve
consistency this now applies to all passwords, until py-bcrypt lifts
this restriction or a suitable alternative to py-bcrypt can be found.