Check values set for port/shared folder before using them. Fixes #396