clean up version handling

Change-Id: I75ad498b2e7cd71726d991f492f10787157f59e2
handle script symlink

Change-Id: I4018ddf906e538fd708a1099a43209c0948eeda1