Fix wrong counting total matched number when used default input
Improve calculation of current replacement position

'^' or 'no' are supported by this change
Merge pull request #33 from syohex/fix-replace-command-bugs

Fix replace command bugs