Fixed a segfault due to fprintf being called with an uninitialized file pointer.
        Renamed global diagnostics file pointer from fd to diag_fd.
        Changed explicit fprintf calls to warnx calls.
Merge pull request #24 from adapteva/bcxcube-diag-crash

Fixed a segfault due to fprintf being called with an uninitialized file ...