Helper function to list files

Via. http://stackoverflow.com/a/17165074/2747593
Allow both absolute and relative paths