Encapsulate iTunes library directory walk in a separate function