add crypto test

Do we need to worry about stat and read throwing exceptions and causing us to leak file descriptors?  I imagine most issues will happen on the openSync step.