Use require.resolve() instead of manual traversal

Use require.resolve() instead of manual traversal for finding protractor.