Refactor test suite

- Move check_* tests to utility
- Separate unit and functional tests
- Add additional test tasks
- Use sys.exit instead of raising exception on subprocess failure for
  tasks.run()