Fixed error with creating nested dirs