fix bug for creating sub folders

Signed-off-by: Kevin Nguyen <k.nguyen@thecodingmachine.com>