Clean up the packaging script to help with debugging.

Moved the debug condition for building the dev package further out. Also I added a bunch of debugging echos