Fixed #2. Added path handling.
Moved import-and-export-from ("pull") action to common function.