Implemented proper build system.

Re-worked: CLI and library separation.
Added: use of extopts lib for command line arguments parsing.
Update gitignore