create file if doesn't exist for non recusive or create dir if recursive