Fix a couple NPEs/excessive log lines
Add test for fixTaskDir behavior. Make some modifications to allow for this test to be possible.
Add unexpected-host case to fixTaskDirs test