Additional tests regarding filenames and middle-of-word matches

Added a few tests (creates dir and files in /tmp). Two places (marked with XXX) not sure what the return result should be.