Code update to reflect latest changes in tern.java due to file managment API reorganization.

This PR provides changes in angularJS plugins to keep them compatible with API changes in tern.java created with PR https://github.com/angelozerr/tern.java/pull/154