Improve package script (fix #403)