change macro name to more suitable name
add new macro for directory end checking
use macro for directory separator checking
correct file system separators initialization
use proper macro for path checking