Fixed several bugs

There was a bug where folders with dots in their name were considered files, I fiwed that
I modified the way the array was sorted to take into account upper and lower case.
I used foreach for generating the table.
Modified the code to not exclude files or folders starting with a "." but to exclude results ".." and "." so that normal folders don't get excluded.