avoid import of nearby temporary with %edit

use mk**s**temp now,
and create files in subfolders.

should close gh-4731

Note that some part of the logic could now use
http://docs.python.org/2/library/tempfile.html#tempfile.NamedTemporaryFile
That will be deleted on close and avoid IPython to track it.
Merge pull request #4848 from Carreau/closes-4731

avoid import of nearby temporary with %edit