Update line endings to Unix
Fix bugs where resource name is used in request URL

Basically the code was using the resource name, rather than the slug
name to build the API URL. Instead the getURLs methods use encodeURI.

Also, the select/option is built using the slug name for the option's
value rather than the name. It was a problem when the name had a space
for example.

Finally, fixed a bug where a loop was going one step too far.