avoid undefined variable errors

If less than 2 arguments are passed to the script, these lines will abort with unbound variable errors due to set -u earlier in the script.
Merge pull request #36 from fukawi2/patch-1

avoid undefined variable errors