Update remotemediator.js

I think this is more readable, so I tried it in jsperf and it's slightly faster too! http://jsperf.com/for-vs-split-search-string
Merge pull request #13 from mattisfrommars/patch-1

Update remotemediator.js