Fix bug related to newer job metadata abstraction.

Plus outline of unit tests for JobDirectory (including test that tracked bug down).