fix directory context for relative paths