Add utility function to get windows packaging directory to avoid memory leaks