Calculate the base directory, rather than hoping for ../ to work