Fixing installer error on password save. $dir not defined, so defining i...

...t at the top of the file.