Minor changes

- Exposed getFlashResult(gets the output of last avrdude command) to Javascript.
- Added a function which detects which serial port was added/removed (debugging).
- Minor code parts added/replaced.