readdir: string length bug fix

If len is 32 (maximum possible value), then we going to write at buf->d_name[31]. Since the d_name length is 31, write is performed outside the string boundaries.
vsprintf: 'static' removed from function declaration - making a file compilable with recent sdcc builds
Merge pull request #22 from atsidaev/lib-20141204

Library fixes