Trim entered directory