Fix auto-rebaseline checking if the tree is closed.

-The response from the http request is a string, not a number.
-Also fixed some ordering to compute test_prefix list a little
later since it's not used until later.

Review URL: https://chromiumcodereview.appspot.com/23042003

git-svn-id: svn://svn.chromium.org/blink/trunk@156106 bbb929c8-8fbe-4397-9dbb-9b2b20218538