Fix a bug where absolute path names URIs were not being parsed correctly

Also adjust the stat file logging name creation to do less allocations.