Fix typo and handle additional failure case in "locksmith_script.rb"