Do proper shell escaping when calling out to security command

Using a password with a dollar sign would previously result in the wrong password stored in the keychain, since the shell expands $variables in double quoted strings. A password with a double quote would presumably cause an error.