Return a correct timestamp when a folder is empty.

If a folder was empty a zero timestamp was returned. Now it will
return the timestamp of the folder itself.