Rewrite of fixit.pl

Finally using scopes and $fh properly, cleaned up the script in general.