changed the method of url encoding in query string. #9 #33

Please review #9 & #33, and merge to master branch.