Cleaning a little the code.

- Adding some spaces and comments
- Use the new PHP __DIR__ magic constant to get current directory
- Spaces -> tabulations
- Refactored a very little the loops, to avoid PHP notices if some info isn't found
Merge pull request #1 from dereckson/master

Cleaning a little the code.