Nothing is wrong with your code, but instead of asking you just should have a look on what is returned. I bet it is "." and ".." since you are on linux. And they are in you directory even if you just have created it.
Moving to newbie. At least this thread...
Bookmarks