improved apt-sources prepare script