Exit with non-zero exit code on SIGINT
Use path.join to join paths

It ignores empty components, and normalizes '.' and '..'.