Add a couple of functions for getting directory contents

Add scandir and scandir_prefix for reading all files and only files with prefix
from a given directory. Files are read to a list.