Fixed regexps for ssh and path

Change-Id: I836c08d091d453fd9974a638ab5522eb72ef4eb9
diff --git a/rsync_url.py b/rsync_url.py
index 2134904..38836ac 100644
--- a/rsync_url.py
+++ b/rsync_url.py
@@ -21,7 +21,7 @@
                 r'(?P<user>[-\w]+@)?'
                 r'(?P<host>[-\.\w]+){1}'
                 r':'
-                r'(?P<path>[\w/-]*){1}'
+                r'(?P<path>(~{0,1}[\w/-]*)){1}'
                 r'$'
             ),
             # rsync: [USER@]HOST::SRC
@@ -45,7 +45,7 @@
             # local/path/to/directory
             'path': re.compile(
                 r'^'
-                r'(?P<path>[\w/-]+){1}'
+                r'(?P<path>(~{0,1}[\w/-]+)){1}'
                 r'$'
             ),
         }