_resolveFilename

Added _resolveFilename and improved both getInstance and __construct filename resolving.

@johnnyfreeman