bin/update.php: fix status & output file permission issues