Handle lastmod better, fixes #11