makedist.sh fixes

* clean target/ before building
* detect the correct jar version if multiple jar versions are present
  in target/scala-2.10