Simple disk io counter

Not sure about the function names, the're very similar but the name fits.
I removed -O3 because it's dangerous and makes debugging harder.
I created pslib.c for platform independent code, consider moving the free_* methods there.