improved escript generation somewhat