Using path.join to ensure path validity