handle relative paths correctly