fixed unit tests after making lockfile and pidfile read-only
Added more unit tests, also changed code to make testing easier and fixing bugs
Reworked unit tests, improved coverage
updated README.pod