fix scripts errors and add support of : post-extract, pre-enable, post-enable
fix unlink warning