catching a replace bug if undefined is sent to makePathRelativeTo