Fixed some obscure bugs in C linkage and filesystem
Fixed a nasty race condition in the profiler
Added sha256/sha512 hash support