use basename and proper quoting in packing script