added new tests
made popup.js testable

- moved onload funtion to additional onload file to isolate it from
other testable code
- added node.js exports
added test file for popup.js