nimbleDir ignored with custom tasks
A custom `--nimbleDir` seems to be ignored when executing a user-defined task.

**Running a pre-defined task:** no packages.json in the newly created nimble directory. This is expected behaviour.
```
 % nimble --nimbleDir:tmp1 --verbose build        
    Setting Nim stdlib prefix to 
    Setting Nim stdlib path to /home/kea/.choosenim/toolchains/nim-0.18.0/lib
  Verifying dependencies for dummy_nim@0.1.0
    Reading official package list
    Prompt: No local packages.json found, download it from internet? [y/N]
```

**Running a custom task:** a packages.json is somehow found despite the custom nimble directory being empty. The dependencies are installed in the wrong directory.
```
 % nimble --nimbleDir:tmp2 --verbose build_example 
    Setting Nim stdlib prefix to 
    Setting Nim stdlib path to /home/kea/.choosenim/toolchains/nim-0.18.0/lib
  Executing task build_example in /home/kea/code/dummy-nim/dummy_nim.nimble
    Setting Nim stdlib prefix to 
    Setting Nim stdlib path to /home/kea/.choosenim/toolchains/nim-0.18.0/lib
  Verifying dependencies for dummy_nim@0.1.0
    Reading official package list
   Checking for jester@any version
 Installing jester@any version
    Reading official package list
Downloading https://github.com/dom96/jester using git
    Cloning latest tagged version: v0.2.0
    Setting Nim stdlib prefix to 
    Setting Nim stdlib path to /home/kea/.choosenim/toolchains/nim-0.18.0/lib
  Verifying dependencies for jester@0.2.0
 Installing jester@0.2.0
    Copying file /tmp/nimble_27574/githubcom_dom96jester/changelog.markdown to /home/kea/.nimble/pkgs/jester-0.2.0/changelog.markdown
    Copying file /tmp/nimble_27574/githubcom_dom96jester/license.txt to /home/kea/.nimble/pkgs/jester-0.2.0/license.txt
    Copying file /tmp/nimble_27574/githubcom_dom96jester/jester.nimble to /home/kea/.nimble/pkgs/jester-0.2.0/jester.nimble
    Copying file /tmp/nimble_27574/githubcom_dom96jester/readme.markdown to /home/kea/.nimble/pkgs/jester-0.2.0/readme.markdown
    Copying file /tmp/nimble_27574/githubcom_dom96jester/jester.nim to /home/kea/.nimble/pkgs/jester-0.2.0/jester.nim
    Copying file /tmp/nimble_27574/githubcom_dom96jester/jester/private/utils.nim to /home/kea/.nimble/pkgs/jester-0.2.0/jester/private/utils.nim
    Copying file /tmp/nimble_27574/githubcom_dom96jester/jester/private/patterns.nim to /home/kea/.nimble/pkgs/jester-0.2.0/jester/private/patterns.nim
    Copying file /tmp/nimble_27574/githubcom_dom96jester/jester/private/errorpages.nim to /home/kea/.nimble/pkgs/jester-0.2.0/jester/private/errorpages.nim
    Copying file /tmp/nimble_27574/githubcom_dom96jester/jester.nimble to /home/kea/.nimble/pkgs/jester-0.2.0/jester.nimble
   Success: jester installed successfully.
```

**dummy_nim.nimble:**
```
version       = "0.1.0"
author        = "kea"
description   = "A dummy package"
license       = "MIT"
srcDir        = "src"
bin           = @["dummy_nim"]

requires "nim >= 0.18.0"
requires "jester"

task build_example, "Build example":
  setCommand "c", "example/example.nim"
```