Fix failing casper tests

no issue
- spam test: changed waitForSelector to waitForText
- feature test: changed waitForRessource to watiForSelector
Merge pull request #1559 from sebgie/failing-tests

Fix failing casper tests
Putting back relative redirects

issue #1523

- also added some comments to indicate the difference between the two custom middleware files.