Separate option parsing function

It contains an failed test.
Fixed parsing cmdArgs
Merge pull request #13 from tkawachi/opt

Separated option parsing function and fixed parsing cmdArgs issue