Test directory creation

Signed-off-by: Sharif Olorin <sio@tesser.org>
Fix null-termination of string we pass to mkdirp

Signed-off-by: Sharif Olorin <sio@tesser.org>