Add unit tests for deep mtime extraction

These are basically the tests from #427, but somewhat rewritten and hopefully more understandable.