Fix typo in example
Move code to check profile_dir from qtrender to resources
Add test for the case when the request contains an invalid js profile
Always load the js libraries as utf-8