Fixed several problems with the emacs file that's installed:

* If the command failed, the entire contents of the file would be wiped out, now it just puts a message in the minibuffer.
* Extracted some methods to remove duplication and clarify intent.
* Introduce temporary variable was using the start column value as the end column value.
* Rename package was renaming all packages to the file path name.
* Required cperl-mode, as the key mapping commands won't work otherwise.