Fixed bug in working out binary path