maxogden/dat — pull request #28 by beaugunderson (2013-12-01 22:12:38+00:00)
Title: Handle case where package.json exists but not .dat

If you run `dat` in a directory that contains a valid `package.json` but not a `.dat` subdirectory you get this error:

```
events.js:72
throw er; // Unhandled 'error' event
^
OpenError: IO error: /home/beau/p/dat/.dat/store.dat/LOCK: No such file or directory
at /home/beau/p/dat/node_modules/level-hyper/node_modules/level-packager/node_modules/levelup/lib/levelup.js:114:34
```

This pull request fixes that error and displays the error message from `dat._ensureExists` in its place:

```
Error: You are not in a dat folder or are missing a package.json. Please run dat init again.
```