Changed PhashWorker workers to wait for work from producer

Workers used to terminate if there was no work, however this is 
error prone.
Added constructor to select buffer strategy
Fixed wait for buffer not working
Added debug messages
Added tests for PhashWorker
Added constructors to allow custom path
Fixed class name typo