Fix possible integer overflows
MAke sure directory entry name is always null-terminated
Use sizeof()
Removed duplicate check
Remove NOP while()
Fix implicit sign extension

Was uint16 * uint16 -> int -> size_t
Fix incorrect pointer calculation in debug message
Address of stack-allocated array can't be NULL
Remove useless if()

"The only fields in the dirent structure that are mandated by POSIX.1
are: d_name[], "...
Support for building with MSVC 2010 & 2012
Added bd_get_clip_infos
Include clpi_data.h to make debugging easier.