Tests: make tests more robust

Closes #81.

(cherry picked from commit 3b590e7)
File dates could be rounded to second or higher

Closes #82.

(cherry picked from commit 5a2e856)