Extract main() function to ease using clcache.py in tests.
First implementation of unit tests for commands file splitting.
More accurate command line splitting.
Merge pull request #19 from vchigrin/command-line-splitting

Thanks a lot!