Use \filemodCmp rather than \pdf@strcmp to compare timestamps
Using \filemodCmp to check timestamps seems to work well. Merging.