This fixes an issue introduced in afb0dce2

If no package name was given, fpm bailed out.
Added tests for commands without package -p <dir>
Merge pull request #691 from vStone/bugfix/File_directory_on_nil

This fixes an issue introduced by supporting -p <dir>
Fix post_install logging; protect previous current dir during clean up
Merge pull request #700 from gerbercj/feature/sh_package_bugfixes

Feature/sh package bugfixes
Fixes an issue where gem-version-bins is enabled but there are no binaries
Added tests. Rebuild of example-1.0.0.gem required though
Updated the example gem with as little changes as possible

checksums.yaml.gz has been stripped as in the current gem.

Changes:

```diff
diff --git a/spec/fixtures/gem/example/example-1.0.gem b/spec/fixtures/gem/example/example-1.0.gem
index 0241779..9238a4a 100644
--- a/spec/fixtures/gem/example/example-1.0.gem
+++ b/spec/fixtures/gem/example/example-1.0.gem
@@ -46,10 +46,12 @@ dependencies:
         version: '0'
 description: sample description
 email: sample email
-executables: []
+executables:
+- example
 extensions: []
 extra_rdoc_files: []
-files: []
+files:
+- bin/example
 homepage: http://sample-url/
 licenses: []
 post_install_message:
@@ -78,3 +80,5 @@ test_files: []
 has_rdoc:
 ============== checksums =============
 =============== files ================
+bin/example
+#!/usr/bin/env ruby

```

See http://vstone.eu/diffing-gems-in-git/