repositories: Avoiding implicit parameters

Having implicit parameters is always a little bit dangerous. Let's make
the $dir explicit instead of implicit.
Merge pull request #104 from enovance/fix_options

repositories: Avoiding implicit parameters