Check if PAC is valid Javascript in pac_init().
Add unit test for pac_init().
Make logger function pluggable.