return all the parent directories for a directory