Catch exceptions in replace file, and add tabs and re-indent

Screenshot of new tabbed look.
http://screencast.com/t/G70W8djrcau