prevent profile_dir from being undefined

can happen when other traits are configured that depend on profile_dir, e.g. `NotebookApp.extra_static_paths`.

This ensures that `init_profile_dir` fires prior to any reference to the profile directory.

closes #3837