diff --git a/src/Resume/Command/HtmlCommand.php b/src/Resume/Command/HtmlCommand.php
index 2d1240d..5aa0fa7 100644
--- a/src/Resume/Command/HtmlCommand.php
+++ b/src/Resume/Command/HtmlCommand.php
@@ -51,7 +51,7 @@ class HtmlCommand extends Command
{
$this->app = $this->getApplication();
$source = $input->getArgument('source');
- $destination = trim($input->getArgument('destination'), DIRECTORY_SEPARATOR);
+ $destination = rtrim($input->getArgument('destination'), DIRECTORY_SEPARATOR);
$template = $input->getOption('template');
$refresh = $input->getOption('refresh');
$destFilename = join(DIRECTORY_SEPARATOR, array($destination, pathinfo($source, PATHINFO_FILENAME) . '.html'));
diff --git a/src/Resume/Command/PdfCommand.php b/src/Resume/Command/PdfCommand.php
index 9f9778b..72211f7 100644
--- a/src/Resume/Command/PdfCommand.php
+++ b/src/Resume/Command/PdfCommand.php
@@ -36,7 +36,7 @@ class PdfCommand extends HtmlCommand
{
$this->app = $this->getApplication();
$source = $input->getArgument('source');
- $destination = trim($input->getArgument('destination'), DIRECTORY_SEPARATOR);
+ $destination = rtrim($input->getArgument('destination'), DIRECTORY_SEPARATOR);
$template = $input->getOption('template');
$pdfSource = join(DIRECTORY_SEPARATOR, array($destination, '.tmp_pdf_source.html'));
$destFilename = join(DIRECTORY_SEPARATOR, array($destination, pathinfo($source, PATHINFO_FILENAME) . '.pdf'));