Fix a bug where "root" is required to be a string otherwise path.join() fails