Add test for empty dir
Add pid to processes while spawning

Suspected cause of the file deletion issue was the cleaner process
reaping an active directory if it ran while a checkout/setup was
running. Placing the pid in the processes hash immediately should
prevent this.