Fix 'Args out of range' issue

'substring' is failed if user short prompt string by deleting
default input.
Merge pull request #16 from syohex/fix-invalid-arg-issue

Fix 'Args out of range' issue