Update pic.js

added requirejs support, fixed error at template
TODO errorobject to replace throw{}