Make script more failsafe for reusage

The scripts now ensure that reusing should always work (maybe for update libtoxcore)