Fix source directory retrieval bug.