fixes split sript before and afer being chrooted