Fix time comparison issues.

Work around what appears to be a bug in time comparison in certain Ruby
version by casting times to ints before comparing them. Fixes cases where
files were being rescanned even when they hadn't changed.