title: Checking Folder & subfolders
body: <p>I've made a method that checks 2 strings passed into itself that see's if a root folder and subfolder within it exists and if they don't, create them. </p>
  
  <p>It's easy enough and it works well but my only issue is when I want to check for a root folder only it returns and error since one of the strings is empty.</p>
  
  <p>Is there a smart way of checking for a path like <code>"/data"</code> , <code>"/data/files"</code> or <code>"/data/files/morefiles"</code> to see if all folders exists and if not, create the missing ones? </p>