fixed some mem leaks; lw buildscript uses relative path