Fixed a bug which occurred when edit was called with an integer index larger than the length of the history
Fixed a bug which occurred when edit was called with an integer index larger than the length of the history

Previously a edit was creating a file named 'None' in this case.
Now an error is printed to the screen and no editor is opened.

Also did some miscellaneous cleanup based on PyCharm warnings.

python-cmd2/cmd2,python-cmd2/cmd2