fix setLicense do not work in when specifies the version

Now only GET /package/underscore will call setLicense method,
but GET /package/underscore/1.5.1 will not call it.
Also fix a small bug in setLicense.