montage: new function to create montages of N-dim images