Index: Dev/github/GitHubBackup.pm
===================================================================
--- Dev/github/GitHubBackup.pm	(revision 19df4003ce0a35bb63b6f9d0e2f5c6e371701b82)
+++ Dev/github/GitHubBackup.pm	(revision 6f31bfb5489a6c454b6e263476ca330df69f593c)
@@ -24,5 +24,4 @@
 
 package GitHubBackup;
-use base qw(Class::Accessor::Fast);
 
 use strict;
@@ -30,8 +29,5 @@
 use utf8;
 use Carp qw(croak);
-
-__PACKAGE__->mk_accessors( qw(
-    directory
-));
+use File::Spec;
 
 
@@ -39,11 +35,7 @@
 sub new {
     my $class = shift;
-    
     my $args = (ref $_[0] eq 'HASH') ? $_[0] : {@_};
-    if (! $args->{directory}) {
-        $args->{directory} = ".";
-    }
-    
-    return $class->SUPER::new($args);
+    
+    return bless $args, $class;
 }
 
@@ -70,4 +62,15 @@
     
     return $self->{repository};
+}
+
+sub directory {
+    my $self = shift;
+    my $args = shift;
+    
+    if (defined $args) {
+        $self->{directory} = File::Spec->rel2abs($args);
+    }
+    
+    return $self->{directory};
 }
 
@@ -126,5 +129,4 @@
 
 package GitHubBackup::Repository;
-use base qw(Class::Accessor::Fast);
 
 use strict;
@@ -134,5 +136,6 @@
 use Git::Repository;
 use File::chdir;
-
+use File::Spec;
+use File::Path qw(mkpath);
 
 sub new {
@@ -145,5 +148,5 @@
     }
     
-    return $class->SUPER::new($args);
+    return bless $args, $class;
 }
 
@@ -151,5 +154,10 @@
     my $self = shift;
     
-    return $self->{directory}->();
+    my $path = $self->{full_name};
+    if (my $base = $self->{directory}->()) {
+        $path = File::Spec->catfile($base, $path);
+    }
+    
+    return $path;
 }
 
@@ -157,5 +165,5 @@
     my $self = shift;
     
-    my $dir = $self->directory .'/'. $self->{full_name};
+    my $dir = $self->directory;
     if (-d "$dir") {
         local $CWD = $dir;
@@ -166,4 +174,5 @@
     
     print "clone ", $dir, "\n";
+    mkpath $dir;
     Git::Repository->run(clone => '--mirror' => $self->{clone_url} => $dir);
     return $self;
