Work on subprocess

Change subprocess.in and subprocess.out to subprocess.communicate.
Add Error treatment if base64 decoding is not possible.
Check subprocess.returnvalue.

Signed-off-by: Sven Haardiek <Sven@Haardiek.de>