A better check for bower.json formats.

Previous commit to support standard bower.json breaks lib only variations of bower.json as reported in https://github.com/42dev/bower-rails/pull/41#issuecomment-28333032. This commit makes the detection more robust.