Fix permissions when running under sudo

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Set all python3 binaries to unbuffered mode

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>