Fix purging old log files with absolute file path
Removing old timestamp or increment versions of log backup files did not work when the file is an absolute path: only the entry name was provided to the file remove function.
The dirname was also bogus, since the file separater was put back too soon.
Fix these issues to make log file rotation work when the file is configured to be an absolute path.
Closes #3991 (closed)