tests: fix test_version by redirecting stderr to stdout

Output was empty because the argument parser prints the
version to stderr.
preserve symlinks pointing to files

TODO: preserve symlink pointing to directories.
Symlinks that point to directories are not listed
as part of the files returned by python's 'walk'
function.
added entering/leaving directory debug messages
Fix directories management

- Manage empty directories.
- Preserve directories' attributes.
- Preserve symlinks pointing to directories.
Merge pull request #4 from antiapuentes/wip

Symlinks and directory management improvements