cmFileCommand: Fix file(TIMESTAMP) relative path handling

Fixes: #23610
67 jobs for !7440 with TheBrokenRail-master-patch-21506 in 35 minutes and 57 seconds (queued for 3 seconds)
merge request