Sometimes it might take a little while before you get a response here.
I created a file and a directory in the path you specified (garrysmod/addons/help) and ran your code without issues.
But Lua can't find at least one file and one directory in your path. As a result, when you're printing, you tell Lua to concatenate a string with a filename/directory that does not exist (nil). Lua will throw that concatenation error if you do that.
The print function can deal with nil values if you don't concatenate with those two dots (..). Try this instead:
print("First file:", files[1], "First directory:", directories[1])