Add unittest case

Currently, does not test anything.
Test can be executed with next command.

```
$ python -m unittest discover
```

Or, use help message.

```
$ python -m unittest -h
```

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Split main procedure to smaller functions

For readability enhance and unit test availability, split main procedure
to smaller and testable functions.

Also, unit test case for those functions added.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Add .gitignore for *.pyc files

Signed-off-by: SeongJae Park <sj38.park@gmail.com>