Added ability to change the length of the generated password.
Added error check on password length input.