Feature request: Better support for folder dependencies
Say I have the following structure:

```
script.py
module/submodule/foo.py
```

Then:

```
dvc run script.py -d module -o bar.npy
```

If I modify foo.py, `dvc repro` does not notice. The reason is that neither the `inode` nor the `mtime` of `module` is updated when a modification is made to `foo.py`.

For now it is possible to add all the files in `module` as dependencies but it would surely be better to have a way to handle folders recursively.
diff --git a/dvc/state.py b/dvc/state.py
index efcf142d8..56d6fadb5 100644
--- a/dvc/state.py
+++ b/dvc/state.py
@@ -96,18 +96,14 @@ class State(object):
 
     @staticmethod
     def mtime(path):
+        mtime = os.path.getmtime(path)
         if os.path.isdir(path):
-            mtime = -1
             for root, dirs, files in os.walk(path):
                 for fname in files:
                     f = os.path.join(root, fname)
                     m = os.path.getmtime(f)
                     if m > mtime:
                         mtime = m
-            if mtime == -1:
-                mtime = os.path.getmtime(path)
-        else:
-            mtime = os.path.getmtime(path)
 
         return str(int(nanotime.timestamp(mtime)))
 
diff --git a/tests/test_repro.py b/tests/test_repro.py
index 827ee8102..01f361a0c 100644
--- a/tests/test_repro.py
+++ b/tests/test_repro.py
@@ -281,6 +281,12 @@ class TestReproChangedDirData(TestDvc):
         self.assertEqual(len(stages), 1)
         self.assertTrue(stages[0] is not None)
 
+        # Check that dvc indeed registers changed output dir
+        shutil.move(self.BAR, dir_name)
+        stages = self.dvc.reproduce(stage.path)
+        self.assertEqual(len(stages), 1)
+        self.assertTrue(stages[0] is not None)
+
 
 class TestReproMissingMd5InStageFile(TestRepro):
     def test(self):
['tests/test_repro.py', 'dvc/state.py']