Fixing make_random_dataset.py and adding a test