Adding capability detection tests

- Added conditional using karma+browserstack to test capability detection in actual browsers
- Made fix needed in capability detection
- Passing all tests
Merge pull request #2 from joseeight/tests

Adding capability detection tests