fix warning condition on notebook startup

should have only warned if file_to_run is defined *and* it's outside the notebook_dir,
but warning was shown even if it was not specified.
Merge pull request #4546 from minrk/not-in-dir-warning

fix warning condition on notebook startup