Using path.join where possible

Closes #601