Fix out of range iterator

Use of uninitialized value $word in substitution (s///) at
/usr/local/xkpasswd.pm//XKPasswd.pm line 2329.

When using substitution characters, this error occurs.

Iterator needs to have upper range reduced by 1 to correct this.
Update .gitignore

Ignore Xcode workspace and userstate.