Fixed many issues with dir and file completions