Handle empty passwords more gracefully.

Fixes issue #2