Fix for situations where atom is opened with a file rather than a directory
Make it work when a file is opened without a project
If nothing is selected, automatically select the entire buffer