linux: Don't test if ~/.brickd exists just try to create it

If creation fails then check for the reason.

Also create directory as 0755 instead of 0700.

Check return value of prepare_paths in main.
Use new PID_FILE_ALREADY_ACQUIRED constant for pid_file_acquire
base64: Cleanup code

Remove unused line variable.

Remove check for len == 0. Due to the way the loop conditions are len
cannot be 0 at this point.
websocket: Check base64_encode return value for error
websocket: Ignore return value of socket_send_platform