Fix some Linux-specific issues in archive script