Fixed build and compile scripts to work with both relative and absolute paths