`dvc move` fails to move datafile to a directory, when the tracking file has a different name than data file
I was playing with `dvc move` and I got this problem.

Script to reproduce it:
```bash
#!/bin/bash -x

rm -rf test1
mkdir test1
cd test1/

echo 'test 1' > file1.txt
dvc init --no-scm
dvc add file1.txt
mv file1.txt.dvc file1.dvc
dvc status
tree -a

mkdir dir1
dvc move file1.txt dir1
dvc status
tree -a
# file1.txt has not been moved to dir1/
```

I am not sure if this is a glitch or everything is as expected, since the `.dvc` file has a different name from the datafile. When tracking file and data file have the same name everything works fine.
diff --git a/dvc/repo/move.py b/dvc/repo/move.py
index 6cd8b915c..84c506ca7 100644
--- a/dvc/repo/move.py
+++ b/dvc/repo/move.py
@@ -59,9 +59,9 @@ def move(self, from_path, to_path):
             os.path.join(os.curdir, os.path.dirname(to_path))
         )
 
-    to_out = Output.loads_from(
-        stage, [os.path.basename(to_path)], out.use_cache, out.metric
-    )[0]
+    to_path = os.path.relpath(to_path, stage.wdir)
+
+    to_out = Output.loads_from(stage, [to_path], out.use_cache, out.metric)[0]
 
     with self.state:
         out.move(to_out)
diff --git a/tests/func/test_move.py b/tests/func/test_move.py
index 3004c7b29..83484e542 100644
--- a/tests/func/test_move.py
+++ b/tests/func/test_move.py
@@ -200,3 +200,13 @@ def test_move_should_save_stage_info(dvc_repo, repo_dir):
     dvc_repo.move(repo_dir.DATA_DIR, "new_name")
 
     assert dvc_repo.status() == {}
+
+
+def test_should_move_to_dir_on_non_default_stage_file(dvc_repo, repo_dir):
+    stage_file_name = "stage.dvc"
+
+    dvc_repo.add(repo_dir.FOO, fname=stage_file_name)
+
+    dvc_repo.move(repo_dir.FOO, repo_dir.DATA_DIR)
+
+    assert os.path.exists(os.path.join(repo_dir.DATA_DIR, repo_dir.FOO))
['tests/func/test_move.py', 'dvc/repo/move.py']