Handle relative paths correctly