Refactors TaskRc parser to match previous version written by @ralphbean.

Adds tests; fixes #51.