open directory when file does not exist
Added if statement in the script, rather than using || directy in the command.
Removed unnecessary else condition.
Also check the parent directory.
Use a local variable instead of script variable.
Merge 'pull-request-1'
Merge pull request #1 from dtinth/master

When editing a new file (doesn't exist in the parent directory), open the directory.