Fixing issue #5277 remote webdriver doesn't throw an exception correctly if using compound class name

Fixing issue #5277 remote webdriver doesn't throw an exception if finding by compound class name

Source of issue is that during remote work json parameter generation was out of try&catch block
so if something like exception for invalid class name locator is thrown
it was not catched and incorrectly returned to client.

2 tests are added.