Hopefully final performance improvements - tokenize all relative paths
only once, in advance.