Fix credentials fetching during publishing

Reviewed at https://rbcommons.com/s/twitter/r/901/
Make sure junit_run task only runs on targets that are junit compaible

Testing Done:
Two questions:

1. any suggestions on how to write a unit test for the code change? I didn't find unittest for this class.

2. how do I test the changes? Should I just create some dummy BUILD files and only put resources targets into it to make sure they're all filtered out and junit_run does an no-opt?

Thanks for bearing with me.

Bugs closed: 508

Reviewed at https://rbcommons.com/s/twitter/r/924/
Put back error message that shows path to missing BUILD files.
Regressed from  https://rbcommons.com/s/twitter/r/841/