Library fixes

Readdir bug was found by *b2m* from http://zx.pk.ru forum. He has no github account, so I'm pushing his patch.
vfprintf bug fixes the error "two or more storage classes in declaration for 'vfprintf'" when building library with trunk version of sdcc