How can I move the modules that are dependencies for a module of mine in another directory?
Drupal 7 doesn't look for modules on /modules. The list of directories looked for modules by drupal_system_listing() is the following one.


profiles/$profile/modules and its sub-directories, where $profile is the short name of the profile currently installed
sites/all/modules  and its sub-directories
$config/modules and its sub-directories, where $config is the directory containing the settings.php file used for the site


All those directories are relative to the directory containing Drupal, so a directory like /modules will never be checked for any module.

Actually, there isn't any need for a module to look for a specific directory for its dependencies. If the dependencies are modules that comes as sub-modules of the main module, they are normally put in the modules directory of the directory containing the main module, but the main module doesn't normally force Drupal to look in a specific directory for its own sub-modules.

Instead of /modules/contrib, you can use sites/all/modules/contrib, or sites/$site_directory/modules/contrib. Those are directory where Drupal looks for modules.

There isn't any way to move a module from browser, and it is normally not necessary. You put the files with FTP or SSH, and you put the modules in the correct directory before installing the module using them.
If you already have your module installed, you disable it, disable its dependencies, move its dependencies in the correct directory (one that Drupal checks), enable them, and enable the module using them. If disabling/enabling doesn't work, you simply uninstall/install the modules.