fix(cli): enhancing object flattening as it breaks objects within capabilities object such as proxy

Tackled this problem after #1029 was closed.  Instead of removing object flattening completely, I've set it up so that it will only flatten phantomjs objects.  This will leave the proxy object intact.  If there are other objects that need to be flattened, please let me know and I will add them.