fixup positional arg parsing in notebook app

- `ipnb .` triggers override of sub-config, even when the parent isn't changed
- `ipnb /path/nb.ipynb` sets notebook_dir to `/path`
write config instead of direct assignment from the command-line

Gross.
Merge pull request #5216 from minrk/notebook-dir-cli

fixup positional arg handling in notebook app