Incorporate a testing semaphore

Changes to add the functionality required to make the `testflag.txt`
work. This can now be used to disable certain services if the
`testflag.txt` file exists in order to prevent interference with
already running servers.