Exclude a possible bin directory when building (#13258)

Change-Id: I34806146d737eb35668684f3edde658a7fc0beb0