Fix wrong delete, may lead to seg fault
Fix paths in packaging commands.

- we have to use the build_tree link to access build tree
to get branch independent code.