Factor out modification time checks in rake tasks.