Applied changes from Tim O'Callaghan (timoc) 76ca0ebed762dc58dd04c556a49...

...d2cf3df1e838d

Fixes errors where an alternative bin directory is used.

Signed-off-by: Martin Stone <martin@d7415.co.uk>