Config parsing moved to separate class (Closes #25)

....and improved lock file handling. Related to Issue #25