Use platform independent path separators in dedup

`npm dedupe` fails silently on windows due to incorrect
path splitting and joining without these changes.