Fix for Issue #17. 

Hello,

This is a fix for issue #17 at which the import target parameter fails when a file extension is provided. 
I just check if the file extension is provided and if it does then the appending is omitted.

Index imports now work in both cases:
```
curl -XPOST 'localhost:9200/testing/_import?target=/tmp/testing'
```
and
````
curl -XPOST 'localhost:9200/testing/_import?target=/tmp/testing.tar.gz'
````