Correcting undefined oldpath when creating new packagefile + making
packages non editable only when user can't edit