Made sure main directory exists