Fixed some bugs

- Replaced me.dpalmero.jsbeautify with me.drewh.jsbeautify-onsave.
- Fixed problem when try to format a invalid extension file.
- Replaced localStorage with brackets.preferences.
- Used functions like event handler.

I hope you like,
Regards.