Removed IOException when reading password, and fixed an issue where
reading password with a mask didnot echo a mask.