Fix mtd.importAll within Python Script Window

The inspect.stack() call was failing with a fresh tab because the
executing code didn't have a valid identifier. For a loaded file it
worked because the identifier was automatically set to the filename.

A blank identifier is now not allowed and it uses a default if an
empty string is passed in. This also fixes a bug with the __file__
attribute not being updated on save.

Refs #7076
Merge remote-tracking branch 'origin/bugfix/7076_importAll_fails_script_window'