Feature/to locator fixes

fixes case of 
```python
_to_locator('[@class="foo"]')
```