added lib function to determine app data directory