Added recursive directory creation ("mkdir -p")
Adapting to style
Added header <sys/stat.h>, changed sprintf for strndup and fixed Segmentation Fault on example
Merge pull request #1 from alexdantas/mkdir-p

Added recursive directory creation ("mkdir -p")